home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / incoming / jstools-.6v3 / jstools- / jstools-tk3.6v3.0 / lib / jinit.tcl < prev    next >
Encoding:
Text File  |  1995-02-09  |  1.4 KB  |  47 lines

  1. # jinit.tcl - common application initialisation procedures
  2. # Copyright 1992-1994 by Jay Sekora.  All rights reserved, except 
  3. # that this file may be freely redistributed in whole or in part 
  4. # for non-profit, noncommercial use.
  5. ######################################################################
  6.  
  7. ### TO DO
  8. ###   more configurability
  9.  
  10. ######################################################################
  11. # global variables:
  12. #
  13. global J_PREFS env
  14. if {! [info exists J_PREFS(autoposition)]} {set J_PREFS(autoposition) 0}
  15. if {! [info exists J_PREFS(confirm)]} {set J_PREFS(confirm) 1}
  16. #
  17. ######################################################################
  18.  
  19.  
  20. ######################################################################
  21. # j:jstools_init - common initialisation for jstools
  22. ######################################################################
  23.  
  24. proc j:jstools_init {} {
  25.   global J_PREFS            ;# user preferences
  26.   
  27.   catch {tk colormodel . color}        ;# colour even on a 2-bit display
  28.   
  29.   global tk_library
  30.   global env
  31.   
  32.   global NAME; set NAME $env(USER)
  33.   global HOME; set HOME $env(HOME)
  34.   
  35.   j:wm_client                ;# set client hostname
  36.   j:wm_command                ;# set client command string
  37.   
  38.   # read in standard jstools preferences:
  39.   
  40.   j:read_global_prefs
  41.   
  42.   # following use users prefs, bindings files:
  43.   j:tb:init Text            ;# uses prefs, ~/.tk/textbindings.tcl
  44.   j:eb:init Entry            ;# uses prefs, ~/.tk/entrybindings.tcl
  45. }
  46.